package org.csu.mypetstore.persistence;

import org.apache.ibatis.annotations.Param;
import org.csu.mypetstore.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryMapper {
    Category getCategory(String categoryId);

    List<Category> getCategoryList();

    List<Category> searchCategoryList(String keywords);

    void updateInventory(@Param("itemid") String itemid, @Param("qty") int qty);

    int getInventory(@Param("itemid") String itemid);

    void insertCategory(@Param("catid") String catid,@Param("name") String name,@Param("descn") String descn);

    void deleteCategory(@Param("categoryId") String categoryId);

    void editCategory(@Param("category") Category category);
}
